package com.groupfour.attendancemanagementsystem.service;

import com.groupfour.attendancemanagementsystem.entity.DO.StudentDO;
import com.groupfour.attendancemanagementsystem.entity.DTO.CRUStudentDTO;
import com.groupfour.attendancemanagementsystem.entity.DTO.PersonalInformationDTO;
import com.groupfour.attendancemanagementsystem.entity.VO.GroupRankingVO;
import com.groupfour.attendancemanagementsystem.entity.VO.PersonalGroupMemberVO;
import com.groupfour.attendancemanagementsystem.entity.VO.ProjectScoreVO;
import com.groupfour.attendancemanagementsystem.entity.VO.RStudentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StudentService {

    /**
     * @author 卑微小峰
     * @param userCode
     * @return StudentDO
     * @describe 获取学生登录信息
     */
    StudentDO getStudentByStudentCode(String userCode);

    /**
     * @author 卑微小峰
     * @param newPwd,userCode
     * @return int
     * @describe 学生修改自己的密码
     */
    int updatePassword(String newPwd, String userCode);


    /**
     * @author 扶永超
     * @param cruStudentDTO,classesCode
     * @return int
     * @describe 添加学生信息
     */
    int addStudent(CRUStudentDTO cruStudentDTO);

    /**
     * @author 扶永超
     * @param studentCode
     * @return int
     * @describe 删除学生信息
     */
    int deleteStudent(String studentCode);

    /**
     * @author 扶永超
     * @param cruStudentDTO
     * @return int
     * @describe 修改学生信息
     */
    int updateStudent(CRUStudentDTO cruStudentDTO,String studentCode);

    /**
     * @author 扶永超
     * @param cruStudentDTO
     * @return List<RStudentDTO>
     * @describe 查询指定班级学生信息
     */
    Map<String,Object> selectStudent(CRUStudentDTO cruStudentDTO,Integer pageNum,Integer pageSize);


    /**
     * @author 卑微小峰
     * @param userCode
     * @return PersonalInformationDTO
     * @describe 获取个人信息
     */
    PersonalInformationDTO getPersonalInformation(String userCode);

    /**
     * @author 卑微小峰
     * @param newPhone,userCode
     * @return int
     * @describe 修改学生手机号码
     */
    int updateStudentPhone(String newPhone, String userCode);

    /**
     * @author 卑微小峰
     * @param newIdentity,userCode
     * @return int
     * @describe 修改学生身份证号码
     */
    int updateStudentIdentity(String newIdentity, String userCode);


    /**
     * @author 章珑赢
     * @param userCode
     * @return List<PersonalGroupMemberVO>
     * @describe 查询小组成员
     */
    List<PersonalGroupMemberVO> selectGroupMember(@Param("userCode") String userCode);

    /**
     * @author 章珑赢
     * @param userCode
     * @return List<ProjectScoreVO>
     * @describe 查询小组得分
     */
    List<ProjectScoreVO> SelectAllProjectScore(@Param("userCode") String userCode);

    /**
     * @author 章珑赢
     * @param courseCode
     * @return List<GroupRankingVO>
     * @describe 查询小组得分
     */
    List<GroupRankingVO> selectGroupRanking(String courseCode);

    int updateStudentPhoto(String savePath, String userCode);
    
}
